package rfc4757

import (
	
	
	
	
	

	
)

// StringToKey returns a key derived from the string provided according to the definition in RFC 4757.
func ( string) ([]byte, error) {
	 := make([]byte, len()*2, len()*2)
	for ,  := range  {
		 := fmt.Sprintf("%04x", )
		,  := hex.DecodeString()
		if  != nil {
			return []byte{}, errors.New("character could not be encoded")
		}
		// Swap round the two bytes to make little endian as we put into byte slice
		[2*] = [1]
		[2*+1] = [0]
	}
	 := bytes.NewReader()
	 := md4.New()
	,  := io.Copy(, )
	if  != nil {
		return []byte{}, 
	}
	return .Sum(nil), nil
}

func deriveKeys(,  []byte,  uint32,  bool) (, ,  []byte) {
	 = 
	 = HMAC(, UsageToMSMsgType())
	 = HMAC(, )
	return
}